package com.tang.param_check.common.logprinter;

import com.tang.param_check.common.delegate.Manager;
import com.tang.param_check.domain.LogDTO;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2022/1/15 21:05
 * @Desc
 * @Remarks
 */
@Component
public class LogPrinterManager extends Manager<AbstractPrintHandler, Void, LogDTO> {
    public LogPrinterManager(List<AbstractPrintHandler> printHandlers) {
        Collections.sort(printHandlers, Comparator.comparing(AbstractPrintHandler::getOrder));
        this.handlers = printHandlers;
    }
}
